<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/jstl/c" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/jstl/fn" prefix="fn" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>直播管理</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
.vb_wid {width:100%; margin: 0 auto; border-top:1px #FDB18D solid; background:#F5F5F5; color:#FE6500; text-indent:20px; line-height:25px; font-size:12px;}
.fb_search {width:100%; margin:0 auto; margin-top:20px; border:1px #FFCD7F solid;}
.fb_search h1 {background:#FFEFBB; margin:0px; padding:0px; line-height:28px; text-indent:10px; font-size:14px;}
.fb_s_a1 {margin:5px; font-size:14px;}
.fb_s_a2 {font-size:12px; line-height:22px; color:#999; margin-left:5px;}
.fb_ddd {width:100%; margin:0 auto; margin-top:10px; border-top:3px #FFCC00 solid; background:url(images/pen.gif) no-repeat 5px 3px; height:40px; text-indent:50px; line-height:40px; color:#464646; font-size:12px;}
.fb_nr {width:100%; margin:0 auto; margin-top:10px; line-height:22px; font-size:12px; color:#464646}
.fb_nr span {color:#FF0000;}
.fb_nr select {color:464646; font-size:12px;}
.fb_nr Div {margin-top:10px; height:30px;}
.fb_nr Div input {font-size:12px; line-height:18px;}
.inputtttt {border:1px #DEA303 solid; height:20px; color:#464646; font-size:12px; background:url(images/bottom_bg.jpg) repeat-x left top;}
.lb {background:#FFCD7F; color:#464646; font-weight:bold; text-align:center; height:30px; line-height:30px;}
.lb1 {border-bottom:1px #000000 dashed; height:28px;}
.lb1 td {border-bottom:1px #ccc dashed; background:#eefefe}
.fy1 {width:90%; margin:0 auto; margin-top:8px; background:#F8F8F8; font-size:12px; height:30px; line-height:28px; text-indent:10px;}
.fy1 span {color:#FF0000; font-weight:bold;}
.fy1 a {color:#464646; text-decoration:none;}
.fy1 a:hover {color:#FF0000; text-decoration:underline;}
</style>
	
	
	<script  type="text/javascript"  language="javascript">
   
   function topage()
   {
      
     var formObj=document.getElementById('searchForm123');
     var page=document.getElementById('toPage').value
     
     
      if(page!=null&&page!='')
     {

       if(!isNotNumReg(page))
       {
         var link='/admin/directSeed.do?method=to_html_list&page='+page;
         window.location.href=link;
       }
        else
       {
         alert('您输入的页码只能是数字!');
         return false;
       }
     }
     else
     {
        alert("页码不能为空!");
      }
      
      
   }
   
   function isNotNumReg(s){
				var temp="0123456789";
				for( j=0;j<s.length; j++ ) 
				{	
					var ch=s.charAt(j);
					if(temp.indexOf(ch) == -1)
					{
						return true;
					}
				}
				return false;
			}
</script>
	<script language="JavaScript">
<!--//

		
		function selectAll(choice) {
		   if(document.forms['theForm1'].checkboxparam.length!=null)
		   {
			   for (var i=0;i<document.forms['theForm1'].checkboxparam.length;i++) 
			   {
					var e=document.forms['theForm1'].checkboxparam[i];
					if(choice==1)e.checked=true;
					if(choice==2)e.checked=(e.checked?false:true);
					if(choice==3)e.checked=false;
				}
		   }
		}
   
   

		function  checkboxIsSelected(){
		   var flag = 0;
		   if(document.forms['theForm1'].checkboxparam.length!=null)
		   {
		        for (var i=0;i<document.forms['theForm1'].checkboxparam.length;i++) 
				   {
				        var e=document.forms['theForm1'].checkboxparam[i];
				        if(e.checked){
							flag = 1;
						}
				   }
				   if(flag==1)
				   {
				     return true;
				   }else{
				        window.alert('至少选择一项!');
				        return false;
				   }
		   }
   
   		   window.alert('至少选择一项!');
		   return false;
		}
   
   
//-->
</script>
  </head>
  
  <body>
   <div class="vb_wid">
   		【直播静态页生成】
   	</div>
<div class="fb_nr">
 
      <logic:present name="DirectSeedList">
 
  	<form action="/admin/directSeed.do?method=update_to_html&page=${curPage}" name="theForm1" method="post" id="theForm1">
  	
		<table width="100%" border="1" cellpadding="0" cellspacing="0" style="font-size:12px">
		    		<tr class="lb">
							<td width="5%">
								选择
							</td>
							<td width="5%">
								ID
							</td>
							<td width="15%">
								直播标题
							</td>

							<td width="10%">
								静态页
							</td>
							<td width="15%">
								文件名
							</td>
							<td width="10%">
								整理时间
							</td>
						</tr>


	<logic:iterate id="list" name="DirectSeedList">
      <tr class="lb1">
      
        <td align="center">
          <input type="checkbox" id="checkboxparam" name="checkboxparam" value="${list.id}" />
        </td>
        
        <td align="center">
          <span>${list.id}</span>
        </td>
        
        <td align="center">
	        ${fn:substring(list.title,0,5)}
        </td>
          
          
        <td align="center">
			<c:if test="${fn:length(list.webadd)>0}">
				<img src="images/edititem.gif" border="0" />
			</c:if>
		</td>

		<td align="center">
			<a href="/html/directSeed/${list.webadd}" target="_blank">${list.webadd}</a>
		</td>
        
        <td align="center">
          ${fn:substring(list.datetime,0,19)}
        </td>
        
      </tr>
      
      	</logic:iterate>
	
    </table>
    
   <table width="100%" border="1" align="center" cellpadding="0"
			cellspacing="0">
			<logic:present name="DirectSeedList">
				<tr>
					<td width="100%">
						<html:button onclick="selectAll(1);" property="button" value="全选" />
						&nbsp;
						<html:button onclick="selectAll(2);" property="button" value="反选" />
						&nbsp;
						<html:button onclick="selectAll(3);" property="button" value="不选" />
						&nbsp;		
				<input type="submit" value="静态页确定生成" name="submit"
									onclick="return checkboxIsSelected();">
				<font color="red">注：&nbsp;有&nbsp; <img
										src="images/edititem.gif" border="0" align="middle" />
									&nbsp;标记的，表明静态文件已经生成</font>
					</td>
				</tr>
			</logic:present>
		</table>
    
    </form>
    
	</logic:present>
    
    
    <form id="searchForm123" name="searchForm123">
    <table width="100%" border="0" cellspacing="1" style="font-size:12px">
            <tr>
               <td colspan="8">
              

	&nbsp;总共有 <span class="red1">${recordNum}</span>条记录&nbsp;当前第${curPage}/${allPage}页
       	<logic:notEmpty name="recordNum">
	<c:if test="${recordNum>0}">
		<c:if test="${curPage>1}">
		     <html:link href="/admin/directSeed.do?method=to_html_list&page=${backPage}" >上一页</html:link>
		</c:if>
		<%--  页码循环 --%>
		<c:if test="${(curPage>=1)&&(curPage<=7)&&(allPage<8)}">
		<c:forEach begin="${1}" end="${allPage}" var="page" step="1" varStatus="pageCount">
			<b>&nbsp;
			<html:link href="/admin/directSeed.do?method=to_html_list&page=${page}" >
				[<c:if test="${curPage==page}">
					<font color="red" class="one">
						<c:out value="${pageCount.index}"></c:out> 
					</font>
				</c:if>
				<c:if test="${curPage!=page}">
						<c:out value="${pageCount.index}"></c:out>
				</c:if>]
			</html:link>
			</b>
		</c:forEach>
		</c:if>
		<c:if test="${(curPage>=1)&&(curPage<=7)&&(allPage>8)}">
		<c:forEach begin="${1}" end="${8}" var="page" step="1" varStatus="pageCount">
			<b>&nbsp;
			<html:link href="/admin/directSeed.do?method=to_html_list&page=${page}" >
				[<c:if test="${curPage==page}">
					<font color="red" class="one">
						<c:out value="${pageCount.index}"></c:out> 
					</font>
				</c:if>
				<c:if test="${curPage!=page}">
						<c:out value="${pageCount.index}"></c:out>
				</c:if>]
			</html:link>
			</b>
		</c:forEach>
		</c:if>
		<c:if test="${curPage>7&&(allPage>(curPage+4))}">
		 <html:link href="/admin/directSeed.do?method=to_html_list&page=${1}" >1</html:link>....
		<c:forEach begin="${(curPage-3)}" end="${(curPage+4)}" var="page" step="1" varStatus="pageCount">
			<b>&nbsp;
			<html:link href="/admin/directSeed.do?method=to_html_list&page=${page}" >
				[<c:if test="${curPage==page}">
					<font color="red" class="one">
						<c:out value="${pageCount.index}"></c:out> 
					</font>
				</c:if>
				<c:if test="${curPage!=page}">
						<c:out value="${pageCount.index}"></c:out>
				</c:if>]
			</html:link>
			</b>
		</c:forEach>
		</c:if>
		<c:if test="${curPage>7&&(allPage<=(curPage+4))}">
         <html:link href="/admin/directSeed.do?method=to_html_list&page=${1}" >1</html:link>....
		<c:forEach begin="${(curPage-3)}" end="${allPage}" var="page" step="1" varStatus="pageCount">
			<b>&nbsp;
			<html:link href="/admin/directSeed.do?method=to_html_list&page=${page}" >
				[<c:if test="${curPage==page}">
					<font color="red" class="one">
						<c:out value="${pageCount.index}"></c:out> 
					</font>
				</c:if>
				<c:if test="${curPage!=page}">
						<c:out value="${pageCount.index}"></c:out>
				</c:if>]
			</html:link>
			</b>
		</c:forEach>
		</c:if>

			<c:if test="${curPage<allPage}">
			<html:link href="/admin/directSeed.do?method=to_html_list&page=${nextPage}" >下一页</html:link>
			</c:if>
            <c:if test="${(allPage>1)&&(curPage<allPage)}">
              <html:link href="/admin/directSeed.do?method=to_html_list&page=${allPage}" >尾页</html:link>       
			</c:if>
	</c:if>
	</logic:notEmpty>      

                到<input id="toPage"  name="toPage" type="text" size="3"/>页&nbsp;
    
      <input type="button"  value=" " style="background-image: url('/admin/images/ck.gif');border:0px;width:58px;"  title="查看"  onclick="return topage();"/>
               </td>
            </tr>
           </table>
    </form>   

   <h1><img src="image/qqddc_shop1.gif" width="720" height="8" /></h1>
</div>
	
	<logic:present name="msg">
		<bean:write name="msg" filter="false" />
	</logic:present>

  </body>
</html:html>

